package com.aspect.aspect.controller;

import com.aspect.aspect.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: admin
 * @Description:
 * @Date: 2018/10/25 17:46
 */

@RestController
@RequestMapping("/home")
public class HomeController {
    @Autowired
    private HomeService homeService;
    @GetMapping("/hello/{name}")
    public String hello(@PathVariable String name){
        try {
            homeService.hello(name);
        } catch (Throwable throwable) {
            throwable.printStackTrace();
        }
        return "hello";
    }
}
